<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>wankeUploader主题</title>
    <script src="http://g.tbcdn.cn/kissy/k/1.4.2/seed-min.js" charset="utf-8"></script>

</head>
<body>
<h2>wankeUploader主题</h2>
<ul>
    <li><a href="https://github.com/KF-kissyForm/butterfly/tree/master/gallery/uploader/1.5.4/themes/wankeUploader" target="_blank">源码</a></li>
    <li>作者：灵吾</li>
    <li>设计：灵吾</li>
    <li>描述：图片上传专用主题</li>
    <li>版本：1.4</li>
    <li>兼容：chrome、firefox、IE9、IE8、IE6</li>
</ul>
<div class="grid">
    <input type="file" class="g-u" id="J_UploaderBtn" value="上传图片" name="Filedata" >
</div>
<ul id="J_UploadGoodsPicList" class="grid" style="margin-top: 15px;">

</ul>
<ul id="J_UploaderQueue" class="grid"></ul>
<script>
    var S = KISSY;
    if(S.Config.debug){
        var srcPath = "../../../../";
        S.config({
            packages:[
                {
                    name:"gallery",
                    path:srcPath,
                    charset:"utf-8"
                }
            ]
        });

    }

    S.use('gallery/uploader/1.5.4/index,gallery/uploader/1.5.4/themes/wankeUploader/index.js,gallery/uploader/1.5.4/themes/wankeUploader/style.css', function (S, Uploader,WankeUploader) {
        //上传组件插件
        var plugins = 'gallery/uploader/1.5.4/plugins/auth/auth';

        S.use(plugins,function(S,Auth){
            var uploader = new Uploader('#J_UploaderBtn',{
                //处理上传的服务器端脚本路径
                action:"Idata-wankeUploader.php"
            });
            //使用主题
            uploader.theme(new WankeUploader({
                queueTarget:'#J_UploaderQueue'
            }));
            //验证插件
            uploader.plug(new Auth({
                allowExts: '*.jpg,*.jpeg,*.png,*.gif,*.bmp',
                maxSize: 10000,
                widthHeight: function (width, height) {
                    return width > 170 && height > 170;
                }
            }));
        });
    })

</script>
</body>
</html>